﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="../lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="../lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
<link rel="stylesheet" type="text/css" href="../lib/jquery.pagination/css/pagination.css" />
<script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="../lib/layer/2.1/layer.js"></script> 
<script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script> 
<script type="text/javascript" src="../lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="../static/h-ui/js/H-ui.js"></script> 
<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script> 
<script type="text/javascript" src="../lib/jquery.pagination/jquery.pagination.js"></script> 
<script type="text/javascript" src="../static/eth/js/pagination.js"></script>
<title>政策列表</title>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>降舱追位
		 <span class="c-gray en">&gt;</span> 当前任务<a
			class="btn btn-success radius r"
			style="line-height: 1.6em; margin-top: 3px"
			href="javascript:location.replace(location.href);" title="刷新"><i
			class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="page-container">
	<form id="form" action="current" method="get">
		<div class="text-c">
			<input type="text" name="pnr" value="${cond.pnr!''}" placeholder=" pnr" style="width:100px" class="input-text">
			<input type="text" style="display:none" name="pageIndex" id="pageIndex" value="${page.curIndex!''}"/>
			<input type="text" style="display:none" name="pageSize" id="pageSize" value="${page.pageSize!''}" />
			<input type="text" style="display:none" name="rowsCount" id="rowsCount" value="${page.rowsCount!''}" />
			<button name="" id="" class="btn btn-success" type="submit" onclick="$('#pageIndex').val(1);"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
		</div>
		<div class="cl pd-5 bg-1 bk-gray mt-20">
			<span class="l">
			    <a onclick="layer_show('添加追位任务','savePage','600','300')" href="javascript:;" class="btn btn-primary radius">
			        <i class="Hui-iconfont">&#xe642;</i> 添加任务</a>
			</span>
		</div>
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c">
					<th width="40"><input name="" id="" type="checkbox" value=""></th>
					<th width="80">ID</th>
					<th width="100">pnr</th>
					<th width="100">新pnr</th>
					<th width="100">乘客姓名</th>
					<th width="100">状态</th>
					<th width="60">已执行次数</th>
					<th width="100">操作</th>
				</tr>
			</thead>
			<tbody class="text-c">
			    <#list page.items! as chase>
				<tr class="text-c">
					<td><input name="chaseCabinIds" type="checkbox" value="${chase.chaseCabinId}"></td>
					<td class="td-id">${chase.chaseCabinId}</td>
					<td class="text-c">${chase.pnr}</td>
					<td class="text-c">${chase.newPnr!}</td>
					<td class="text-c">${chase.passengers!}</td>
					<td class="td-status"><span class="label label-success radius">${chase.statusName!}</span></td>
					<td class="text-c">${chase.runCount!}</td>
					<td class="td-manage">
					    <#if chase.status! == "UP">
					        <a style="text-decoration:none" onClick="policy_pulloff(${chase.chaseCabinId})" href="javascript:;" title="下架"><i class="Hui-iconfont">&#xe6de;</i></a>
					    </#if>
					    <#if chase.status! == "DOWN">
					        <a style="text-decoration:none" onClick="policy_puton(${chase.chaseCabinId})" href="javascript:;" title="上架"><i class="Hui-iconfont">&#xe6dc;</i></a>
					    </#if>
					    <a style="text-decoration:none" class="ml-5" onClick="policy_edit('政策编辑','editPage?chaseCabinId=${chase.chaseCabinId}')" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> 
					    <a style="text-decoration:none" class="ml-5" onClick="policy_del(${chase.chaseCabinId})" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
					</td>
				</tr>
				</#list>
			</tbody>
		</table>
	</div>
	</form>
	<div id="Pagination" class="pagination mt-20"></div>
</div>
<script type="text/javascript">
function policy_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
function policy_show(title,url,id){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
function policy_pulloff(id){
	layer.confirm('确认要挂起吗？',function(index){
		ajaxSubmit('POST', 'pulloff', 'chaseCabinId=' + id);
	});
}
function policy_puton(id){
	layer.confirm('确认要上架吗？',function(index){
		ajaxSubmit('POST', 'puton', 'chaseCabinId=' + id);
	});
}
function policy_edit(title,url){
	layer.close();
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
function policy_del(id){
	layer.confirm('确认要删除吗？',function(index){
		ajaxSubmit('POST', 'delete', 'chaseCabinId=' + id);
	});
}
/*批量-处理*/
function policy_pulloffs(){
	var ids = getCheckIds("chaseCabinIds");
	if (checkIds(ids)){
		layer.confirm('确认要挂起吗？',function(index){
			ajaxSubmit('POST', 'pulloffs', "chaseCabinIds="+ids);
		});
	}
}
function policy_putons(){
	var ids = getCheckIds("chaseCabinIds");
	if (checkIds(ids)){
		layer.confirm('确认要上架吗？',function(index){
			ajaxSubmit('POST', 'putons', "chaseCabinIds="+ids);
		});
	}
}
</script>
</body>
</html>